// page width (1024 condition)
	
var winWidth = $(window).width();
if (winWidth < 1000) {
	$('.container').css('padding', '0 10px');
}
// ------------------------------------------------------------------
// menu first child hover 
$('.nav li').first().hover(function(){
	$('.left-corner').addClass('hover');
},function(){
	$('.left-corner').removeClass('hover');
});
// ------------------------------------------------------------------
// home slider 
$(window).load(function(){
      $('.main-slider').flexslider({
        animation: "fade",
		controlNav: false,
		slideshowSpeed: 7000,
		directionNav: false,
        start: function(slider){
          $('body').removeClass('loading');
        }
      });
	  
	  $('.flexslider').flexslider({
        animation: "slide",
        animationLoop: false,
        itemWidth: 119,
        itemMargin: 10,
		slideshow: false,
		prevText: "",
		nextText: "",
		controlNav: false,
        pausePlay: false,
        start: function(slider){
          $('body').removeClass('loading');
        }
      });
    });
// --------------------------------------------------------------------
if (($.browser.msie) && ($.browser.version <= "9.0")) {
	$('.main-slider-mask input[type=text]').val('Enter Keywords...');
	$('.main-slider-mask input[type=text]').focus(function(){
				if($(this).val() == 'Enter Keywords...' ){
					$(this).val('');
				}	
			});
	$('.main-slider-mask input[type=text]').blur(function(){
				if($(this).val() == '' ){
					$(this).val('Enter Keywords...');
				}
	});
	}

	
// -----------------------------------------------------------------------
// appends
	$('.content-block ul li').prepend('<span class="icon"></span>');
	$('.sitemap li li, .sitemap li li li, .not_found li').prepend( $( "<span class='icon'></span>" ) );
	$( ".content-block ul li" ).wrapInner( "<div class='text'></div>");
	$('.content-block ul li span.icon').each(function() {
				$(this).parent().before(this);
	});
// --------------------------------------------------------------------
	$('.table tr:odd td').css('background', '#f2f2f2');
	
	/****
	var pageHeight = $('.inner-content').height();
	$('.inner-left-column, .inner-right-column').height(pageHeight+ 100);
	*****/
	var leftHeight = $('.inner-left-column').height();
	var rightHeight = $('.inner-right-column').height();
	
	if (leftHeight > rightHeight) {
		$('.inner-right-column').height(leftHeight);
	}
	else if (rightHeight > leftHeight) {
		$('.inner-left-column').height(rightHeight);
	}
	
	
	/* ================================================
		Calendar & news 
   ================================================ */
$(window).load(function() {
		// top 
        $('.news-block:even p').each(function(index, element) {
            if ( $(this).children('i').length > 0 ) {
				$(this).children('i').css({float: 'right', marginRight: '0', marginLeft: '24px'});
				
		}
		else{
			$(this).children('span').css('width', 'auto');
		}
        });
		
		// bottom 
		$('.news-block:odd p').each(function(index, element) {
			if ( $(this).children('i').length > 0 ) {
				
				$(this).children('span').css({width: '435px'});
		}
		else{
			
			//$('.news-block:odd h4').css({float: 'left', width: 'auto'});
			$(this).children('span').css({width: 'auto'});
		}
		});
		
		$('.news-block p').each(function(){
			var y = $(this).width();
			var x = $(this).children('i').children('img').width()+26;
			$(this).children('.news-block p i + span').width(y-x);
			$(this).children('i').width($(this).children('i').children('img').width()+2);
			
			// console.log("image width" +'\n' + x);
			
			// console.log("paragraph" +'\n' + y);
		});
		
		$('.list-fake span.square').html('&#9642;');
    });